<template>
  <div class="table-list">
    <dv-scroll-board :config="config" class="table" style="height:45vh" />
  </div>
</template>

<script>
export default {
  name: '',
  props: {
    headerList: {
      type: Array,
      default: () => [],
    },
    dataList: {
      type: Array,
      default: () => [],
    },
    columnWidth: {
      type: Array,
      default: () => [],
    },

    eqNum: {
      type: Object,
      default: () => {
        return {}
      },
    },
  },
  watch: {
    dataList: {
      handler(newData) {
        this.config = {
          header: this.headerList,
          // headerHeight: 30,
          data: newData,
          index: false,
          columnWidth: this.columnWidth,
          align: ['left'],
          // headerBGC: '#0b9acf',
          headerBGC: '',
          oddRowBGC: '',
          evenRowBGC: 'rgba(52,99,171,0.15)',
          waitTime: '5000',
          rowNum: 12,
        }
      },
      immediate: true,
      deep: true,
    },
  },
  data() {
    return {
      config: null,
    }
  },
  mounted() {},
  methods: {},
}
</script>

<style scoped>
.table-list {
  position: relative;
}

.table {
  padding-left: 2rem;
  padding-right: 2rem;
  padding-top: 5vh;
  color: #ccc;
}
</style>
